<?php
namespace App\Services\Sp;

use App\Services\ProjectValidate;
/**
 * @Author: Marte
 * @Date:   2017-05-27 16:25:13
 * @Last Modified by:   ws
 * @Last Modified time: 2018-06-12 10:16
 */
class ValidateSp extends ProjectValidate
{
    /**
     * 自定义子类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {
        
    }
    
    public $rules = [
        'full_name' => 'required',
        'sp_type' => 'required',
        'simple_name' => 'required',
        'card_type' => 'in:1,2,3,4',
        'card' => 'required|unique:sp,card',
        'phone_name' => 'required',
        'phone' => 'required|unique:sp,phone',
        'check_cycle' => 'in:1,2,3,4,5',
        'fix_choose' => 'in:1,2,3,4,5,6,7',
        'main' => 'required',
        'email' => 'email|unique:sp,email',
        'email1' => 'email|unique:sp,email',
        'email2' => 'email|unique:sp,email',
        'work_sketch' => 'required',
        'remark' => 'required',
        'agree_record' => 'required',
        'weixin' => 'unique:sp,weixin',
        'weibo' => 'unique:sp,weibo',

    ];


    public $messages = [
       
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
       'weixin' => '微信',
       'weibo' => '微博',
        'card' => '证件号',
        'email' => '商务邮箱',
        'email1' => '财务邮箱',
        'email2' => '上线邮箱',
    ];
}